package com.itheima.neibulei;

public class 匿名内部类1 {
    public static void main(String[] args) {
        Entry en = new Entry() {
            @Override
            public void method() {
                System.out.println("接口多态,匿名内部类method方法....."); }
            @Override
            public void show() {
                System.out.println("接口多态,匿名内部类show方法....."); }
        };
        en.method();
        en.show();
        new Entry(){

            @Override
            public void method() { }

            @Override
            public void show() { }

            public void swim() {
                System.out.println("接口多态,匿名内部类show方法....."); }}.swim();

    }
}
